package com.accounting.client.remote.enumeration;

import java.util.List;

import corelib.client.CollectionUtil;

public class PackageType {
	
    public final static PackageType Order  = new PackageType(0,  "Order", "订单包裹");
    public final static PackageType Stock  = new PackageType(1,  "Stock", "库存包裹");
    public final static PackageType Normal = new PackageType(99, "Private", "私人包裹");
	
    public final static List<PackageType> All = CollectionUtil.newArrayList(Normal, Order, Stock);
    		
    private int type;
	private String name;
	private String cname;
	
	public PackageType(int type, String name, String cname){
		this.type = type;
		this.name = name;
		this.cname = cname;
	}
	
	public int getType() {
		return type;
	}
	public void setType(int type) {
		this.type = type;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getCName() {
		return cname;
	}
	public void setCname(String cname) {
		this.cname = cname;
	}
	
	public final static PackageType getPackageType(int type){
		switch(type){
		case 0: return Order;
		case 1: return Stock;
		default: return Normal;
		}
	}
	
	
}
